Code viewer
Modify Skin Hat via Scripting
#Code
Want to add more to the hat, particles? Statusseffects? even a HUD? This small code in GameMod can help you solve that!
This will trigger when the hat is worn, when the hat is unworn, don't worry, the game literally recreate the skeletalmeshcomponent from scratch whenever a hat is changed via ability wheel or the skin from your backpack.
function OnLoadoutChanged(PlayerController Controller, Object Loadout, Object BackpackItem) { local Hat_LoadoutBackpackItem lbi; local PrimitiveComponent pc; if(!BackpackItem.IsA('Hat_LoadoutBackpackItem')) return; lbi = Hat_LoadoutBackpackItem(BackpackItem); if(lbi.ItemQualityInfo == None) return; if(!(lbi.ItemQualityInfo.default.CosmeticItemName ~= "NAME OF THE INT COSMETIC FOUND IN THAT FILE CLASS")) return; // the hat of the player pc = Hat_InventoryManager(Controller.Pawn.InvManager).Hat.DroppedPickupMesh; // Do stuff like particles and statuseffects! // Really that's it, just pass it around or cast it into a "SkeletalMeshComponent()" for more additional modifications // Examples, when the player sprints, make it spin or something like I don't know, think of it I'm not your dad. }